class Cat:

	# 初始化对象
	# 注意,init的左右都两个下划线. 
	def __init__(self,name,age):
		# 添加默认属性
		self.name = name
		self.age = age

	def eat(self):
		print('猫在吃肯德基')

	def drink(self):
		print('猫在喝果啤')

	def introduce(self):
		print(self.name)

# 创建对象时候传入参数
tom = Cat('Tom',40)
tom.eat()
tom.drink()
# tom.name = 'tom'
# tom.age = 40
tom.introduce()

lanmao = Cat('Lanmao',10)
# lanmao.name = 'lanmao'
# lanmao.age = 12
lanmao.introduce()